package cn.com.pc.content.controller;

import cn.com.pc.content.domain.Biz;
import cn.com.pc.content.domain.Site;
import cn.com.pc.content.domain.tag.TagHistory;
import cn.com.pc.content.dto.*;
import cn.com.pc.content.service.TagHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 打标签历史记录管理
 *
 */
@RestController
@RequestMapping("/tag-histories")
public class TagHistoryController {

    @Autowired
    TagHistoryService tagHistoryService;


    /**
     * 查询打标签历史记录列表
     * @param site
     * @param biz
     * @param tagHistoryDTO
     * @return
     */
    @GetMapping
    public PageResult<TagHistory> listTagHistoryByDTO(@RequestAttribute("site") Site site, @RequestAttribute(value = "biz", required = false) Biz biz, TagHistoryDTO tagHistoryDTO, PageForm pageForm, Sort sort) {
        tagHistoryDTO.setSite(site);
        return tagHistoryService.listTagHistoryByDTO(tagHistoryDTO, pageForm, sort);
    }



}
